home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 October: Mac OS SDK / Dev.CD Oct 97 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / CIncludes / VideoServices.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-08-12  |  4.4 KB  |  169 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        VideoServices.h
  3.  
  4.      Contains:    Video Services Library Interfaces.
  5.  
  6.      Version:    Technology:    PowerSurge 1.0.2
  7.                  Release:    Universal Interfaces 3.0.1
  8.  
  9.      Copyright:    © 1994-1997 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:        Please include the the file and version information (from above) with
  12.                  the problem description.  Developers belonging to one of the Apple
  13.                  developer programs can submit bug reports to:
  14.  
  15.                      devsupport@apple.com
  16.  
  17. */
  18. #ifndef __VIDEOSERVICES__
  19. #define __VIDEOSERVICES__
  20.  
  21. #ifndef __TYPES__
  22. #include <Types.h>
  23. #endif
  24. #ifndef __NAMEREGISTRY__
  25. #include <NameRegistry.h>
  26. #endif
  27. #ifndef __QUICKDRAW__
  28. #include <Quickdraw.h>
  29. #endif
  30.  
  31.  
  32.  
  33. #if PRAGMA_ONCE
  34. #pragma once
  35. #endif
  36.  
  37. #ifdef __cplusplus
  38. extern "C" {
  39. #endif
  40.  
  41. #if PRAGMA_IMPORT
  42. #pragma import on
  43. #endif
  44.  
  45. #if PRAGMA_STRUCT_ALIGN
  46.     #pragma options align=mac68k
  47. #elif PRAGMA_STRUCT_PACKPUSH
  48.     #pragma pack(push, 2)
  49. #elif PRAGMA_STRUCT_PACK
  50.     #pragma pack(2)
  51. #endif
  52.  
  53.  
  54. enum {
  55.     kTransparentEncoding        = 0,
  56.     kInvertingEncoding            = 1
  57. };
  58.  
  59.  
  60. enum {
  61.     kTransparentEncodingShift    = (kTransparentEncoding << 1),
  62.     kTransparentEncodedPixel    = (0x01 << kTransparentEncodingShift),
  63.     kInvertingEncodingShift        = (kInvertingEncoding << 1),
  64.     kInvertingEncodedPixel        = (0x01 << kInvertingEncodingShift)
  65. };
  66.  
  67.  
  68.  
  69.  
  70.  
  71. enum {
  72.     kHardwareCursorDescriptorMajorVersion = 0x0001,
  73.     kHardwareCursorDescriptorMinorVersion = 0x0000
  74. };
  75.  
  76. typedef UInt32 *                        UInt32Ptr;
  77. struct HardwareCursorDescriptorRec {
  78.     UInt16                             majorVersion;
  79.     UInt16                             minorVersion;
  80.     UInt32                             height;
  81.     UInt32                             width;
  82.     UInt32                             bitDepth;
  83.     UInt32                             maskBitDepth;
  84.     UInt32                             numColors;
  85.     UInt32Ptr                         colorEncodings;
  86.     UInt32                             flags;
  87.     UInt32                             supportedSpecialEncodings;
  88.     UInt32                             specialEncodings[16];
  89. };
  90. typedef struct HardwareCursorDescriptorRec HardwareCursorDescriptorRec;
  91.  
  92. typedef HardwareCursorDescriptorRec *    HardwareCursorDescriptorPtr;
  93.  
  94. enum {
  95.     kHardwareCursorInfoMajorVersion = 0x0001,
  96.     kHardwareCursorInfoMinorVersion = 0x0000
  97. };
  98.  
  99. struct HardwareCursorInfoRec {
  100.     UInt16                             majorVersion;                /* Test tool should check for kHardwareCursorInfoMajorVersion1*/
  101.     UInt16                             minorVersion;                /* Test tool should check for kHardwareCursorInfoMinorVersion1*/
  102.     UInt32                             cursorHeight;
  103.     UInt32                             cursorWidth;
  104.     CTabPtr                         colorMap;                    /* nil or big enough for hardware's max colors*/
  105.     Ptr                             hardwareCursor;
  106.     UInt32                             reserved[6];                /* Test tool should check for 0s*/
  107. };
  108. typedef struct HardwareCursorInfoRec HardwareCursorInfoRec;
  109.  
  110. typedef HardwareCursorInfoRec *            HardwareCursorInfoPtr;
  111.  
  112.  
  113. enum {
  114.     kVBLInterruptServiceType    = FOUR_CHAR_CODE('vbl '),
  115.     kHBLInterruptServiceType    = FOUR_CHAR_CODE('hbl '),
  116.     kFrameInterruptServiceType    = FOUR_CHAR_CODE('fram'),
  117.     kConnectInterruptServiceType = FOUR_CHAR_CODE('dci '),        /* Renamed -- Use kFBCheckInterruptServiceType*/
  118.     kFBConnectInterruptServiceType = kConnectInterruptServiceType, /* Demand to check configuration (Hardware unchanged)*/
  119.     kFBChangedInterruptServiceType = FOUR_CHAR_CODE('chng'),    /* Demand to rebuild (Hardware has reinitialized on dependent change)*/
  120.     kFBOfflineInterruptServiceType = FOUR_CHAR_CODE('remv'),    /* Demand to remove framebuffer (Hardware not available on dependent change -- but must not buserror)*/
  121.     kFBOnlineInterruptServiceType = FOUR_CHAR_CODE('add ')        /* Notice that hardware is available (after being removed)*/
  122. };
  123.  
  124. typedef ResType                         InterruptServiceType;
  125. typedef UInt32                             InterruptServiceIDType;
  126. typedef InterruptServiceIDType *        InterruptServiceIDPtr;
  127. EXTERN_API_C( OSErr )
  128. VSLNewInterruptService            (RegEntryID *            serviceDevice,
  129.                                  InterruptServiceType     serviceType,
  130.                                  InterruptServiceIDPtr     serviceID);
  131.  
  132. EXTERN_API_C( OSErr )
  133. VSLWaitOnInterruptService        (InterruptServiceIDType  serviceID,
  134.                                  Duration                 timeout);
  135.  
  136. EXTERN_API_C( OSErr )
  137. VSLDisposeInterruptService        (InterruptServiceIDType  serviceID);
  138.  
  139. EXTERN_API_C( OSErr )
  140. VSLDoInterruptService            (InterruptServiceIDType  serviceID);
  141.  
  142. EXTERN_API_C( Boolean )
  143. VSLPrepareCursorForHardwareCursor (void *                cursorRef,
  144.                                  HardwareCursorDescriptorPtr  hardwareDescriptor,
  145.                                  HardwareCursorInfoPtr     hwCursorInfo);
  146.  
  147.  
  148.  
  149. #if PRAGMA_STRUCT_ALIGN
  150.     #pragma options align=reset
  151. #elif PRAGMA_STRUCT_PACKPUSH
  152.     #pragma pack(pop)
  153. #elif PRAGMA_STRUCT_PACK
  154.     #pragma pack()
  155. #endif
  156.  
  157. #ifdef PRAGMA_IMPORT_OFF
  158. #pragma import off
  159. #elif PRAGMA_IMPORT
  160. #pragma import reset
  161. #endif
  162.  
  163. #ifdef __cplusplus
  164. }
  165. #endif
  166.  
  167. #endif /* __VIDEOSERVICES__ */
  168.  
  169.